#pragma once

#include "Muzzy A Wrappers/DirectX.h"
#include "ibaseobject.h"
#include "Renderer.h"
#include "Geometry.h"

class IRenderable : public IBaseObject
{
protected:
	Geometry	*m_pGeometry;
	Matrix		 m_Transform;

	Renderer::Priority m_ePriority;

public:
	IRenderable() { TranslateMatrix(m_Transform,0,0,0); }
	virtual ~IRenderable(void) = 0 {}

	void Render() const;

	//////////////////////////////////////////////////////////////////////////
	// Accessors and Mutators
	Renderer::Priority getPriority()				const	{ return m_ePriority; }
	const Matrix&	getTransform()					const	{ return m_Transform; }
	Geometry*		getGeometry()					const	{ return m_pGeometry; }
	Vector3			getPosition()					const	{ return Vector3(m_Transform._41,m_Transform._42,m_Transform._43); }
	void			setPriority(Renderer::Priority val)		{ m_ePriority = val; }
	void			setTransform(const Matrix &val)			{ m_Transform = val; }
	void			setGeometry(Geometry *val)				{ m_pGeometry = val; }
	void			setPosition(const Vector3 &val)			{ m_Transform._41 = val.x;m_Transform._42 = val.y;m_Transform._43 = val.z; }
	void			setTexture(IDirect3DTexture9 *val);
	//////////////////////////////////////////////////////////////////////////

private:
	static Renderer *pRenderer;
};

